{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import deepmusic.songstruct as music\n",
    "from deepmusic.midiconnector import MidiConnector\n",
    "\n",
    "test_song = music.Song()\n",
    "main_track = music.Track()\n",
    "\n",
    "for i in range(44):  # Add some notes\n",
    "    new_note = music.Note()\n",
    "\n",
    "    new_note.note = (i%2)*(21+i) +((i+1)%2)*(108-i)\n",
    "    new_note.duration = 50\n",
    "    new_note.tick = 50*i  # Absolute time in tick from the begining\n",
    "    \n",
    "    main_track.notes.append(new_note)\n",
    " \n",
    "test_song.tracks.append(main_track)\n",
    "MidiConnector.write_song(test_song, 'test')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "ename": "ImportError",
     "evalue": "No module named 'deepmusic.moduleloader'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mImportError\u001b[0m                               Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-4-1214dfc0f19e>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mdeepmusic\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmusicdata\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mMusicData\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m~/Jupyter_notebook/DL_Basic_Test/deepmusic/musicdata.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     24\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mjson\u001b[0m  \u001b[0;31m# Load initiators (inputs for generating new songs)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     25\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 26\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mdeepmusic\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmoduleloader\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mModuleLoader\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     27\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mdeepmusic\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmidiconnector\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mMidiConnector\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     28\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mdeepmusic\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmidiconnector\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mMidiInvalidException\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mImportError\u001b[0m: No module named 'deepmusic.moduleloader'"
     ]
    }
   ],
   "source": [
    "from deepmusic.musicdata import MusicData"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
